<template>
  <div class="baoquan">
    <el-dialog :visible.sync="saveDialogVisible" top="66px" width="1286px" @close="close">
      <div class="banner scrollBar">
        <div class="search scrollBar">
          <div class="top">
            <span v-print="'#printTest'">打印</span>
            <span class="yi"></span>
            <span @click="last">上一期</span>
            <span class="yi"></span>
            <span @click="next">下一期</span>
          </div>
          <div class="banner1" id="printTest">
            <div class="text">
              <div class="title">
                <h1>阳光纪检监察智慧监督平台运行报告</h1>
                <h3>{{year}}年第{{month}}期 （{{month}}月）</h3>
              </div>
              <div class="text1">
                <p>一、信访举报</p>
              </div>
              <div class="first">
                <p>截至目前，共收到{{complain.total}}条举报信息，有效举报数{{complain.valid}}条，已处理{{complain.processed}}条，未处理{{complain.unprocessed}}条，受理率{{complain.validRate}}。</p>
                <p>本月收到信访举报{{complain.monthTotal}}件，已受理{{complain.monthValid}}件。未处理{{complain.monthUnprocessed}}件。举报渠道为二维码举报{{complain.monthQrCode}}件，网络举报{{complain.monthWebPage}}件。环比{{complain.monthRatio}}。</p>
              </div>

              <div class="text1">
                <p>二、三公经费</p>
              </div>
              <div class="first">
                <p>截至目前，今年三公经费累计{{consumption.totalForYear}}万元，同比{{consumption.yearCompare}}。</p>
                <p>本月三公经费新增{{consumption.addForMon}}万元，环比{{consumption.preMonCompare}}，同比{{consumption.monCompare}}。</p>
              </div>
              <div class="text1">
                <p>三、三重一大</p>
              </div>
              <div class="first">
                <p>本月三重一大会议召开了{{meeting.monthTotal}}次。党支部会议{{meeting.monthPartyOrg}}次，总经理办公会议{{meeting.monthPresidentOffice}}次，董事会会议{{meeting.monthBoard}}次。</p>
              </div>
            </div>

            <div class="text">
              <div class="text1 text2">
                <p>四、廉政档案</p>
              </div>
              <div class="first">
                <p>截止目前，已有{{lzda.allCompanyNum}}家子公司接入系统，监督对象{{lzda.allJddxNum}}个，监察对象{{lzda.allJcdxNum}}个。</p>
                <p>本月新增{{lzda.addCompanyNum}}家二级公司、{{lzda.addJddxNum}}个监督对象、{{lzda.addJcdxNum}}个监察对象廉政档案、内容更新{{lzda.updateNum}}个。</p>
              </div>
              <div class="second">
                <div class="end">
                  <p class="three">亦庄控股纪委监察专员办公室</p>
                  <p class="four">{{year}}年{{month}}月</p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  data() {
    return {
      // 保全总量
      saveDialogVisible: false,
      // 保全编号
      name: "",
      region: "",
      year: "",
      month: "",
      // 保全时间
      date: "",
      // 廉政
      complain: {
        total: "",
        valid: "",
        processed: "",
        unprocessed: "",
        validRate: "",
        monthTotal: "",
        monthValid: "",
        monthUnprocessed: "",
        monthQrCode: "",
        monthWebPage: "",
        monthRatio: "",
      },
      consumption: {
        addForMon: "",
        monCompare: "",

        preMonCompare: "",

        totalForYear: "",
        yearCompare: "",
      },
      meeting: {
        monthTotal: "",
        monthPartyOrg: "",
        monthPresidentOffice: "",
        monthBoard: "",
      },
      lzda: {
        allCompanyNum: "",
        allJddxNum: "",
        allJcdxNum: "",
        addCompanyNum: "",
        addJddxNum: "",
        addJcdxNum: "",
        updateNum: "",
      },
    };
  },
  created() {
    this.get();
  },
  methods: {
    // 上一期
    last() {
      var newYear = this.year;
      var newMonth = this.month-- - 1;
      if (newMonth < 1) {
        newYear--;
        newMonth += 12;
      }
      this.year = newYear;
      this.month = newMonth;
      this.getOne();
    },
    // 下一期
    next() {
      var eYear = this.year;
      var eMonth = ++this.month;
      if (eMonth > 12) {
        eYear++;
        eMonth -= 12;
      }
      this.year = eYear;
      this.month = eMonth;
      this.getOne();
    },
    get() {
      var datetime = new Date();
      var year = datetime.getFullYear();
      var month =
        datetime.getMonth() + 1 < 10
          ? "0" + (datetime.getMonth() + 1)
          : datetime.getMonth() + 1;
     
      this.year = year;
      this.month = month;
      this.Api.reportSimple({
        year: year,
        month: month,
      }).then((res) => {
      
        this.complain = res.data.complain;
        this.meeting = res.data.meeting;
        this.lzda = res.data.lzda;
        this.consumption = res.data.consumption;
      });
    },
    getOne() {
      this.Api.reportSimple({
        year: this.year,
        month: this.month,
      }).then((res) => {
        this.complain = res.data.complain;
        this.meeting = res.data.meeting;
        this.lzda = res.data.lzda;
        // this.consumption=res.data.consumption
      });
    },
    show() {
      this.saveDialogVisible = true;
    },
    close() {
      this.get();
    },
  },
};
</script>
<style lang="less" scoped>
.text2 {
  margin-top: -160px;
}
/deep/.el-dialog__header {
  background: url("../assets/images/运行报告.png") #000080 !important;
  background-position: 10px !important;
  background-repeat: no-repeat !important;
  position: relative;
  padding: 81px 10px 10px 0px;
  box-sizing: border-box;
  width: 100%;
}
/deep/.el-dialog__body {
  padding: 30px 20px;
  box-sizing: border-box;
  color: #606266;
  font-size: 14px;
  background: url(../assets/images/bg.png);
  background-repeat: repeat !important;
  height: 800px !important;
}

.head_right {
  position: absolute;
  top: 30px;
  font-size: 24px;
  font-weight: 500;
  right: 70px;
  width: 350px;
  height: 36px;
  line-height: 36px;
  color: rgba(6, 255, 255, 1);
}
.banner {
  width: 1246px;
  height: 800px;
  padding: 30px 2px 30px 0;
  background: url("../assets/images/运行报告3.png");
  background-size: 100% 100%;
  background-repeat: no-repeat !important;
  position: absolute;
  top: 70px;
  display: flex;
  box-sizing: border-box;
}

.search {
  flex: 1;
  height: 750px;
  overflow-y: auto;
  box-sizing: border-box;
}
.top {
  display: flex;
  color: #06ffff;
  justify-content: flex-end;
  align-items: center;

  margin-right: 23px;
}
.top span {
  display: inline-block;
  height: 28px;
  font-size: 20px;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 500;
  color: rgba(6, 255, 255, 1);
  line-height: 28px;
}
.top .yi {
  width: 2px;
  height: 18px;
  background: rgba(6, 255, 255, 1);
  margin: 0 20px;
}
.text {
  width: 1200px;

  background: white;
  margin-left: 23px;
  margin-bottom: 24px;
  margin-top: 17px;
  padding: 150px 180px;
  box-sizing: border-box;
}
.title h1 {
  font-size: 45px;
  font-weight: normal;
  color: rgba(255, 6, 6, 1);
  line-height: 53px;
  text-align: center;
}
.title h3 {
  font-size: 35px;
  font-weight: normal;
  font-family: KaiTi_GB2312;
  color: rgba(255, 6, 6, 1);
  line-height: 40px;
  text-align: center;
}
.text1 p {
  width: 192px;
  height: 33px;
  font-size: 32px;
  font-family: SimHei;
  color: rgba(0, 0, 0, 1);
  line-height: 38px;
  margin-top: 94px;
}
.first {
  margin-top: 71px;
}
.first p {
  text-indent: 2em;
  margin-top: 60px;
  font-size: 32px;
  font-family: FangSong;
  color: rgba(0, 0, 0, 1);
  line-height: 63px;
}
.second p {
  width: 100%;
  height: 63px;
  font-size: 32px;
  font-family: FangSong;
  color: rgba(0, 0, 0, 1);
  line-height: 63px;
}

.second1 {
  margin-top: 0px;
  font-size: 32px;
  font-family: FangSong;
  color: rgba(0, 0, 0, 1);
}
.second1 table td {
  width: 278px;
}

.second .two {
  margin-top: 0;
}
.end {
  text-align: right;
  margin-top: 745px;
  box-sizing: border-box;
}
.end p {
  font-size: 32px;
  font-family: SimHei;
  color: rgba(0, 0, 0, 1);
}
</style>